﻿using System.Data.Entity;
using CredentialsService.Data;

namespace CredentialsService.Persistence
{
    public class UserStoreContext : DbContext
    {
        public UserStoreContext()
            : base("aspnetdbConnectionString")
        { }

        public UserStoreContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
        { }

        public DbSet<Application> Applications { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.Configurations.Add(new ApplicationEntityTypeConfiguration());
        }
    }
}